<!--5.移除出购物车，删除对应session-->
<?php
if(session_status() == PHP_SESSION_NONE) {
    session_start();
}

$did = $_GET['did'];
unset($_SESSION["d" . $did]);

if ($_SESSION['flag'] > 0) {
    $_SESSION['flag'] = $_SESSION['flag'] - 1;
}

header("location:cart.php");

?>